#include"heap.h"
int main()
{
	HP hp;
	Heapinit(&hp);
	Heappush(&hp, 1);
	Heappush(&hp, 2);
	Heappush(&hp, 3);
	Heappush(&hp, 4);
	Heappush(&hp, 5);
	Heappush(&hp, 6);
	Heappush(&hp, 7);
	printf("%d ", Heaptop(&hp));

	while (!Heapempty(&hp))
	{
		printf("%d ", hp.a[hp.size-1]);
		hp.size--;
	}
	Heapdestroy(&hp);
	return 0;
}